package makaveli.listview;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class MainActivity extends Activity{
	People[] peopleArray = new People[9];
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		peopleArray[0] = new People("Some1", "Familia1", 10, 1000);
		peopleArray[1] = new People("Some2", "Familia2", 20, 2000);
		peopleArray[2] = new People("Some3", "Familia3", 30, 3000);
		peopleArray[3] = new People("Some4", "Familia4", 40, 4000);
		peopleArray[4] = new People("Some5", "Familia5", 50, 5000);
		peopleArray[5] = new People("Some6", "Familia6", 60, 6000);
		peopleArray[6] = new People("Some7", "Familia7", 70, 7000);
		peopleArray[7] = new People("Some8", "Familia8", 80, 8000);
		peopleArray[8] = new People("Some9", "Familia9", 90, 9000);
		
		ListView myList = (ListView) findViewById(R.id.myListView);
		MyAdapter<People> adapter = new MyAdapter<People>(this, peopleArray);
		myList.setAdapter(adapter);
	}
}